package creational.singleton;

/**
 * @Description: 枚举
 * @Author: lxt
 * @CreateDate: 2019/11/1
 **/
public class Singleton7 {

    private static enum SingletonEnum {
        INSTANCE;
        private Singleton7 ins;

        private SingletonEnum() {
            ins = new Singleton7();
        }

        public Singleton7 getInstance() {
            return ins;
        }
    }

    private Singleton7() {

    }

    public Singleton7 getInstance() {
        return SingletonEnum.INSTANCE.getInstance();
    }

}
